package com.usian.mapper;

import com.usian.pojo.Course;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface CourseMapper {

    public void insertCourse(Course course);

   @Select("select * from course")
    List<Course> findList();

    void add(Course course);

    @Delete("delete from course where id=#{id}")
    void del(Integer id);

    @Select("select * from course where id=#{id}")
    Course updates(Integer id);

    @Update("update course set name=#{name},score=#{score},sex=#{sex},birth=#{birth} where id=#{id} ")
    void update(Course course);
}
